<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      width: 200px;
      height: 200px;
      background-color: rebeccapurple;
      border: 1px solid red;
      /* 
      内边距：
      - 内容区和边框之间的距离
      - 一共有四个方向的内边距
      - 内边距的设置会影响到盒子的大小
      - 背景会延伸到内边距上
      
      */
      padding-top: 100px;
    }

    .inner {
      width: 100%;
      height: 100%;
      background: blue;
    }
  </style>
</head>

<body>
  <div class="box">
    <div class="inner"></div>
  </div>
</body>

</html>